<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Drawing Function of Keypoints and Matches</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Drawing Function of Keypoints and Matches<div class="ingroups"><a class="el" href="../../da/d9b/group__features2d.html">2D Features Framework</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga2c2ede79cd5141534ae70a3fd9f324c8"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d5d/group__features2d__draw.html#ga2c2ede79cd5141534ae70a3fd9f324c8">cv::DrawMatchesFlags</a> { <br/>
  <a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8a5b39c8b553c821e7cddc6da64b5bd2ee">cv::DrawMatchesFlags::DEFAULT</a> = 0, 
<br/>
  <a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8a32be7350ff5af15003fcaddf36653971">cv::DrawMatchesFlags::DRAW_OVER_OUTIMG</a> = 1, 
<br/>
  <a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8a811ff9a659123ff7317ccd1269e59259">cv::DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS</a> = 2, 
<br/>
  <a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8ad640260b7dc8b32e0bf35c2696da24f8">cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS</a> = 4
<br/>
 }</td></tr>
<tr class="separator:ga2c2ede79cd5141534ae70a3fd9f324c8"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5d2bafe8c1c45289bc3403a40fb88920"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d5d/group__features2d__draw.html#ga5d2bafe8c1c45289bc3403a40fb88920">cv::drawKeypoints</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp;keypoints, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> outImage, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;color=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1), <a class="el" href="../../d4/d5d/group__features2d__draw.html#ga2c2ede79cd5141534ae70a3fd9f324c8">DrawMatchesFlags</a> flags=<a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8a5b39c8b553c821e7cddc6da64b5bd2ee">DrawMatchesFlags::DEFAULT</a>)</td></tr>
<tr class="memdesc:ga5d2bafe8c1c45289bc3403a40fb88920"><td class="mdescLeft"> </td><td class="mdescRight">Draws keypoints.  <a href="../../d4/d5d/group__features2d__draw.html#ga5d2bafe8c1c45289bc3403a40fb88920">More...</a><br/></td></tr>
<tr class="separator:ga5d2bafe8c1c45289bc3403a40fb88920"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad8f463ccaf0dc6f61083abd8717c261a"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d5d/group__features2d__draw.html#gad8f463ccaf0dc6f61083abd8717c261a">cv::drawMatches</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> img1, const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp;keypoints1, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> img2, const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp;keypoints2, const std::vector&lt; <a class="el" href="../../d4/de0/classcv_1_1DMatch.html">DMatch</a> &gt; &amp;matches1to2, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> outImg, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;matchColor=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1), const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;singlePointColor=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1), const std::vector&lt; char &gt; &amp;matchesMask=std::vector&lt; char &gt;(), <a class="el" href="../../d4/d5d/group__features2d__draw.html#ga2c2ede79cd5141534ae70a3fd9f324c8">DrawMatchesFlags</a> flags=<a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8a5b39c8b553c821e7cddc6da64b5bd2ee">DrawMatchesFlags::DEFAULT</a>)</td></tr>
<tr class="memdesc:gad8f463ccaf0dc6f61083abd8717c261a"><td class="mdescLeft"> </td><td class="mdescRight">Draws the found matches of keypoints from two images.  <a href="../../d4/d5d/group__features2d__draw.html#gad8f463ccaf0dc6f61083abd8717c261a">More...</a><br/></td></tr>
<tr class="separator:gad8f463ccaf0dc6f61083abd8717c261a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga62fbedb5206ab2faf411797e7055c90f"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d5d/group__features2d__draw.html#ga62fbedb5206ab2faf411797e7055c90f">cv::drawMatches</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> img1, const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp;keypoints1, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> img2, const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp;keypoints2, const std::vector&lt; std::vector&lt; <a class="el" href="../../d4/de0/classcv_1_1DMatch.html">DMatch</a> &gt; &gt; &amp;matches1to2, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> outImg, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;matchColor=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1), const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;singlePointColor=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1), const std::vector&lt; std::vector&lt; char &gt; &gt; &amp;matchesMask=std::vector&lt; std::vector&lt; char &gt; &gt;(), <a class="el" href="../../d4/d5d/group__features2d__draw.html#ga2c2ede79cd5141534ae70a3fd9f324c8">DrawMatchesFlags</a> flags=<a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8a5b39c8b553c821e7cddc6da64b5bd2ee">DrawMatchesFlags::DEFAULT</a>)</td></tr>
<tr class="separator:ga62fbedb5206ab2faf411797e7055c90f"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga2c2ede79cd5141534ae70a3fd9f324c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2c2ede79cd5141534ae70a3fd9f324c8">◆ </a></span>DrawMatchesFlags</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d4/d5d/group__features2d__draw.html#ga2c2ede79cd5141534ae70a3fd9f324c8">cv::DrawMatchesFlags</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d5/d0d/features2d_8hpp.html">opencv2/features2d.hpp</a>&gt;</code></p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga2c2ede79cd5141534ae70a3fd9f324c8a5b39c8b553c821e7cddc6da64b5bd2ee"></a>DEFAULT </td><td class="fielddoc"><p>Output image matrix will be created (<a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create</a>), i.e. existing memory of output image may be reused. Two source image, matches and single keypoints will be drawn. For each keypoint only the center point will be drawn (without the circle around keypoint with keypoint size and orientation). </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2c2ede79cd5141534ae70a3fd9f324c8a32be7350ff5af15003fcaddf36653971"></a>DRAW_OVER_OUTIMG </td><td class="fielddoc"><p>Output image matrix will not be created (<a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create</a>). Matches will be drawn on existing content of output image. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2c2ede79cd5141534ae70a3fd9f324c8a811ff9a659123ff7317ccd1269e59259"></a>NOT_DRAW_SINGLE_POINTS </td><td class="fielddoc"><p>Single keypoints will not be drawn. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2c2ede79cd5141534ae70a3fd9f324c8ad640260b7dc8b32e0bf35c2696da24f8"></a>DRAW_RICH_KEYPOINTS </td><td class="fielddoc"><p>For each keypoint the circle around keypoint with keypoint size and orientation will be drawn. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga5d2bafe8c1c45289bc3403a40fb88920"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5d2bafe8c1c45289bc3403a40fb88920">◆ </a></span>drawKeypoints()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::drawKeypoints </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp; </td>
          <td class="paramname"><em>keypoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>outImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>color</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d4/d5d/group__features2d__draw.html#ga2c2ede79cd5141534ae70a3fd9f324c8">DrawMatchesFlags</a> </td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8a5b39c8b553c821e7cddc6da64b5bd2ee">DrawMatchesFlags::DEFAULT</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>outImage</td><td>=</td><td>cv.drawKeypoints(</td><td class="paramname">image, keypoints, outImage[, color[, flags]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d5/d0d/features2d_8hpp.html">opencv2/features2d.hpp</a>&gt;</code></p>
<p>Draws keypoints. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>Source image. </td></tr>
    <tr><td class="paramname">keypoints</td><td>Keypoints from the source image. </td></tr>
    <tr><td class="paramname">outImage</td><td>Output image. Its content depends on the flags value defining what is drawn in the output image. See possible flags bit values below. </td></tr>
    <tr><td class="paramname">color</td><td>Color of keypoints. </td></tr>
    <tr><td class="paramname">flags</td><td>Flags setting drawing features. Possible flags bit values are defined by DrawMatchesFlags. See details above in drawMatches .</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>For Python API, flags are modified as cv.DRAW_MATCHES_FLAGS_DEFAULT, cv.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS, cv.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG, cv.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS </dd></dl>
</div>
</div>
<a id="gad8f463ccaf0dc6f61083abd8717c261a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad8f463ccaf0dc6f61083abd8717c261a">◆ </a></span>drawMatches() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::drawMatches </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>img1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp; </td>
          <td class="paramname"><em>keypoints1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>img2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp; </td>
          <td class="paramname"><em>keypoints2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d4/de0/classcv_1_1DMatch.html">DMatch</a> &gt; &amp; </td>
          <td class="paramname"><em>matches1to2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>outImg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>matchColor</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>singlePointColor</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; char &gt; &amp; </td>
          <td class="paramname"><em>matchesMask</em> = <code>std::vector&lt; char &gt;()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d4/d5d/group__features2d__draw.html#ga2c2ede79cd5141534ae70a3fd9f324c8">DrawMatchesFlags</a> </td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8a5b39c8b553c821e7cddc6da64b5bd2ee">DrawMatchesFlags::DEFAULT</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>outImg</td><td>=</td><td>cv.drawMatches(</td><td class="paramname">img1, keypoints1, img2, keypoints2, matches1to2, outImg[, matchColor[, singlePointColor[, matchesMask[, flags]]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>outImg</td><td>=</td><td>cv.drawMatchesKnn(</td><td class="paramname">img1, keypoints1, img2, keypoints2, matches1to2, outImg[, matchColor[, singlePointColor[, matchesMask[, flags]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d5/d0d/features2d_8hpp.html">opencv2/features2d.hpp</a>&gt;</code></p>
<p>Draws the found matches of keypoints from two images. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img1</td><td>First source image. </td></tr>
    <tr><td class="paramname">keypoints1</td><td>Keypoints from the first source image. </td></tr>
    <tr><td class="paramname">img2</td><td>Second source image. </td></tr>
    <tr><td class="paramname">keypoints2</td><td>Keypoints from the second source image. </td></tr>
    <tr><td class="paramname">matches1to2</td><td>Matches from the first image to the second one, which means that keypoints1[i] has a corresponding point in keypoints2[matches[i]] . </td></tr>
    <tr><td class="paramname">outImg</td><td>Output image. Its content depends on the flags value defining what is drawn in the output image. See possible flags bit values below. </td></tr>
    <tr><td class="paramname">matchColor</td><td>Color of matches (lines and connected keypoints). If matchColor==<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f" title="returns a scalar with all elements set to v0 ">Scalar::all</a>(-1) , the color is generated randomly. </td></tr>
    <tr><td class="paramname">singlePointColor</td><td>Color of single keypoints (circles), which means that keypoints do not have the matches. If singlePointColor==<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f" title="returns a scalar with all elements set to v0 ">Scalar::all</a>(-1) , the color is generated randomly. </td></tr>
    <tr><td class="paramname">matchesMask</td><td>Mask determining which matches are drawn. If the mask is empty, all matches are drawn. </td></tr>
    <tr><td class="paramname">flags</td><td>Flags setting drawing features. Possible flags bit values are defined by DrawMatchesFlags.</td></tr>
  </table>
  </dd>
</dl>
<p>This function draws matches of keypoints from two images in the output image. Match is a line connecting two keypoints (circles). See <a class="el" href="../../d4/d5d/group__features2d__draw.html#ga2c2ede79cd5141534ae70a3fd9f324c8">cv::DrawMatchesFlags</a>. </p>
</div>
</div>
<a id="ga62fbedb5206ab2faf411797e7055c90f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga62fbedb5206ab2faf411797e7055c90f">◆ </a></span>drawMatches() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::drawMatches </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>img1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp; </td>
          <td class="paramname"><em>keypoints1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>img2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp; </td>
          <td class="paramname"><em>keypoints2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; std::vector&lt; <a class="el" href="../../d4/de0/classcv_1_1DMatch.html">DMatch</a> &gt; &gt; &amp; </td>
          <td class="paramname"><em>matches1to2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>outImg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>matchColor</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>singlePointColor</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; std::vector&lt; char &gt; &gt; &amp; </td>
          <td class="paramname"><em>matchesMask</em> = <code>std::vector&lt; std::vector&lt; char &gt; &gt;()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d4/d5d/group__features2d__draw.html#ga2c2ede79cd5141534ae70a3fd9f324c8">DrawMatchesFlags</a> </td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="../../d4/d5d/group__features2d__draw.html#gga2c2ede79cd5141534ae70a3fd9f324c8a5b39c8b553c821e7cddc6da64b5bd2ee">DrawMatchesFlags::DEFAULT</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>outImg</td><td>=</td><td>cv.drawMatches(</td><td class="paramname">img1, keypoints1, img2, keypoints2, matches1to2, outImg[, matchColor[, singlePointColor[, matchesMask[, flags]]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>outImg</td><td>=</td><td>cv.drawMatchesKnn(</td><td class="paramname">img1, keypoints1, img2, keypoints2, matches1to2, outImg[, matchColor[, singlePointColor[, matchesMask[, flags]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d5/d0d/features2d_8hpp.html">opencv2/features2d.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
